﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Model.ZXBuiness; 
using Xproject.Framework.Core.Repositories;
using Xproject.Framework.Utility.Extensions;

namespace Repository.ZXBuiness
{
    public static class ZXUserInfoRep
    {
        public static ZXUserInfo GetById(this IRepositoryAsync<ZXUserInfo> repository, long zxUserId)
        {
            Expression<Func<ZXUserInfo, bool>> express = i => 1 == 1;
            express = express.AndAlso(i => i.ZX_UserId == zxUserId);
            return repository.Query().Where(express).Select().FirstOrDefault();
        }

    }
}
